package com.zms.maze;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;

public class Tracker {
	
	private Hashtable<String, Integer> tracker=new Hashtable<>();
	private List<Maze> winStates=new ArrayList<>();
	
	public void put(Maze maze, int state)
	{
		String signature=maze.createSignature();
		tracker.put(signature, state);
		if (state==MummyConst.WIN)
		{
			winStates.add(maze.clone());
		}
	}
	public boolean containsKey(Maze maze)
	{
		if (tracker.containsKey(maze.createSignature()))
			return true;
		return false;
	}
	
	public List<Maze> getListWinStates()
	{
		return this.winStates;
	}

}
